#define _CRT_SECURE_NO_WARNINGS


#include		<stdio.h>
#include		<stdlib.h>
#include		<time.h>
#include		<math.h>
#include		<string.h>
#include		<ctype.h>
#include        <assert.h>
#include		<windows.h>
#include		<errno.h>


int main()
{
	int arr1[10][10] = { 0 };
	int arr2[2][3] = { {1,2,3},{4,5,6} };

	int line1 = sizeof(arr1) / sizeof(arr1[0]);
	int column1 = sizeof(arr1[0]) / sizeof(arr1[0][0]);

	int line2 = sizeof(arr2) / sizeof(arr2[0]);
	int column2 = sizeof(arr2[0]) / sizeof(arr2[0][0]);

	int i = 0;
	int j = 0;
	for (i = 0;i < line1;i++)
	{
		for (j = 0;j < column1;j++)
		{
			printf("%d ", arr1[i][j]);
		}
		printf("\n");
	}
	printf("**************************************\n");
	for (i = 0;i < line2;i++)
	{
		for (j = 0;j < column2;j++)
		{
			printf("%d ", arr2[i][j]);
		}
		printf("\n");
	}
	printf("**************************************\n");
	for (i = 0;i < line2;i++)
	{
		for (j = 0;j < column2;j++)
		{
			arr1[j][i] = arr2[i][j];
		}
	}
	for (i = 0;i < column2;i++)
	{
		for (j = 0;j < line2;j++)
		{
			printf("%d ", arr1[i][j]);
		}
		printf("\n");
	}
	printf("**************************************\n");
	for (i = 0;i < line1;i++)
	{
		for (j = 0;j < column1;j++)
		{
			printf("%d ", arr1[i][j]);
		}
		printf("\n");
	}
	printf("**************************************\n");
	for (i = 0;i < line1;i++)
	{
		for (j = i;j < column1;j++)
		{
			int tmp = arr1[i][j];
			arr1[i][j] = arr1[j][i];
			arr1[j][i] = tmp;
		}
	}

	/*for (i = 0;i < line1;i++)
	{
		for (j = 0;j < i;j++)
		{
			int tmp = arr1[i][j];
			arr1[i][j] = arr1[j][i];
			arr1[j][i] = tmp;
		}
	}*/


	for (i = 0;i < line1;i++)
	{
		for (j = 0;j < column1;j++)
		{
			printf("%d ", arr1[i][j]);
		}
		printf("\n");
	}
	printf("**************************************\n");




	return 0;
}

